/**
 * Copyright © 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
 */
package com.jeeplus.modules.jpform.service;

import java.util.List;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.jeeplus.core.service.TreeService;
import com.jeeplus.common.utils.StringUtils;
import com.jeeplus.modules.jpform.entity.JpTestCar;
import com.jeeplus.modules.jpform.mapper.JpTestCarMapper;

/**
 * 测试Service
 * @author 姜盼
 * @version 2021-11-01
 */
@Service
@Transactional(readOnly = true)
public class JpTestCarService extends TreeService<JpTestCarMapper, JpTestCar> {

	public JpTestCar get(String id) {
		return super.get(id);
	}
	
	public List<JpTestCar> findList(JpTestCar jpTestCar) {
		if (StringUtils.isNotBlank(jpTestCar.getParentIds())){
			jpTestCar.setParentIds(","+jpTestCar.getParentIds()+",");
		}
		return super.findList(jpTestCar);
	}
	
	@Transactional(readOnly = false)
	public void save(JpTestCar jpTestCar) {
		super.save(jpTestCar);
	}
	
	@Transactional(readOnly = false)
	public void delete(JpTestCar jpTestCar) {
		super.delete(jpTestCar);
	}
	
}